package com.quanyan.assets.service;

import com.quanyan.api.APIRequest;
import com.quanyan.api.APIResponse;
import com.quanyan.assets.entity.CouponInfoVo;
import com.quanyan.assets.entity.ObtainCouponsParamsVo;
import com.quanyan.assets.entity.TbUserAssets;
import com.quanyan.assets.request.ReqCoupon;
import com.quanyan.assets.response.RespCoupon;
import com.quanyan.assets.response.RespOrderCoupon;
import com.quanyan.common.enums.BaseEnum;

/**
 * Created by wmb on 2016/10/13.
 */
public interface CouponService {
    //获取已领取或失效的优惠券列表
    APIResponse<RespOrderCoupon> getReceiveCouponList(APIRequest<ReqCoupon> apiRequest);

    //获取订单使用的优惠券列表
    APIResponse<RespOrderCoupon> getOrderCouponList(APIRequest<ReqCoupon> apiRequest);

    //冻结优惠券
    APIResponse<RespCoupon> freezeCoupon(APIRequest<ReqCoupon> apiRequest);

    //解冻优惠券(成功)
    APIResponse<TbUserAssets> unfreezeCouponSuccess(APIRequest<ReqCoupon> apiRequest);

    //解冻优惠券(失败)
    APIResponse<TbUserAssets> unfreezeCouponFail(APIRequest<ReqCoupon> apiRequest);

    //手机号和用户uid关联（自动注册）
    APIResponse<BaseEnum> associateUsers(APIRequest<ReqCoupon> apiRequest);

    //通过优惠券Code获取信息
    APIResponse<RespCoupon> getInfoByCode(String couponCode);

    /**
     * 发放优惠券
     * @param paramsVo
     * @return
     */
    APIResponse<CouponInfoVo> obtainCoupons(ObtainCouponsParamsVo paramsVo);

}
